Repository navigation
fix(guard): tidy small install, uninstall and ci rough edges (#110) - #113
Merged
Merged
Conversation
When our entries were the only hooks in a harness config, unregister
left an empty "hooks": {} behind. Remove the key in that case.
Refs #110
install overwrote an unparsable user config without a backup, while repair kept a .bak copy; repair also spread a non-array harnesses value into characters. Share one backup helper and one harness-merge helper between both commands. Refs #110
Treat /cygdrive/c/... like the Git Bash /c/... form, so cd and git -C into a Cygwin path keep the protected-branch and freshness checks. Refs #110
check.test.mjs and levels.test.mjs set only XDG_CONFIG_HOME and HOME, so on Windows a real %APPDATA% config could leak in. Set APPDATA and USERPROFILE too. Refs #110
An unknown --scope value reached the guard, which printed "install failed" while the script exited 0. Validate opt-in|all up front and exit with usage, like the PowerShell ValidateSet. Refs #110
The workflow runs the guard tests as well as the SKILL.md lint. The README badge points at the file, so the rename does not break it; no branch protection refers to the workflow name. Refs #110
7 tasks done
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Clears every item of #110, one atomic commit each:
"hooks": {}left in the harness config when ours were the only hooks (registry.mjs)installnow backs up an unparsable user config to.baklikerepair; both share one backup helper and one harness-merge helper, so a non-arrayharnessesvalue is ignored inrepairtoo--scopevalue exits 1 with usage before anything is written (matches the PowerShellValidateSet)Lint SKILL.md→Lint and guard tests. The README badge points at the file, and no branch protection refers to the nameenable/disableact on the current repository/cygdrive/<drive>/...maps to the drive like Git Bash/c/...;check.test.mjsandlevels.test.mjsalso setAPPDATA/USERPROFILE[Unreleased]→ FixedCloses #110
Test plan
node --test hooks/test/on Linux — 216/216./scripts/lint.sh— All checks passedinstall_linux.sh --scope everywherein a temporary HOME → exit 1, nothing written;--scope=allinstall +--uninstall→ settings left as{}lint+guard-tests(ubuntu/macos/windows), including the two isolated tests on Windows — all greenChecklist